package com.apollographql.apollo.subscription;

import java.io.IOException;
import java.util.Map;
import com.kt.Deprecated;
import com.kt.Metadata;
import com.kt.jvm.JvmStatic;
import com.kt.jvm.internal.DefaultConstructorMarker;
import com.kt.jvm.internal.Intrinsics;
import okio.Buffer;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b6\u0018\u0000 \u00032\u00020\u0001:\b\u0003\u0004\u0005\u0006\u0007\b\t\nB\u0007\b\u0002¢\u0006\u0002\u0010\u0002\u0001\u0007\u000b\f\r\u000e\u000f\u0010\u0011¨\u0006\u0012"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage;", "", "()V", "Companion", "Complete", "ConnectionAcknowledge", "ConnectionError", "ConnectionKeepAlive", "Data", "Error", "Unsupported", "Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionError;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionAcknowledge;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$Data;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$Error;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$Complete;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionKeepAlive;", "Lcom/apollographql/apollo/subscription/OperationServerMessage$Unsupported;", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
/* compiled from: OperationServerMessage.kt */
public abstract class OperationServerMessage {
    public static final Companion Companion = new Companion(null);
    public static final String JSON_KEY_ID = "id";
    public static final String JSON_KEY_PAYLOAD = "payload";
    public static final String JSON_KEY_TYPE = "type";

    @Deprecated(message = "This method is deprecated. Use an OperationMessageSerializer instead.")
    @JvmStatic
    public static final OperationServerMessage fromJsonString(String str) {
        return Companion.fromJsonString(str);
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\u0004H\u0007R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Companion;", "", "()V", "JSON_KEY_ID", "", "JSON_KEY_PAYLOAD", "JSON_KEY_TYPE", "fromJsonString", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "json", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
            this();
        }

        @Deprecated(message = "This method is deprecated. Use an OperationMessageSerializer instead.")
        @JvmStatic
        public final OperationServerMessage fromJsonString(String json) {
            Intrinsics.checkParameterIsNotNull(json, "json");
            try {
                return ApolloOperationMessageSerializer.INSTANCE.readServerMessage(new Buffer().writeUtf8(json));
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }
    }

    private OperationServerMessage() {
    }

    public /* synthetic */ OperationServerMessage(DefaultConstructorMarker $constructor_marker) {
        this();
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \f2\u00020\u0001:\u0001\fB\u001b\u0012\u0014\u0010\u0002\u001a\u0010\u0012\u0004\u0012\u00020\u0004\u0012\u0006\u0012\u0004\u0018\u00010\u00050\u0003¢\u0006\u0002\u0010\u0006J\u0013\u0010\u0007\u001a\u00020\b2\b\u0010\t\u001a\u0004\u0018\u00010\u0005H\u0002J\b\u0010\n\u001a\u00020\u000bH\u0016R\u001e\u0010\u0002\u001a\u0010\u0012\u0004\u0012\u00020\u0004\u0012\u0006\u0012\u0004\u0018\u00010\u00050\u00038\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionError;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "payload", "", "", "", "(Ljava/util/Map;)V", "equals", "", "other", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class ConnectionError extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "connection_error";
        public final Map<String, Object> payload;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public ConnectionError(Map<String, ? extends Object> map) {
            super(null);
            Intrinsics.checkParameterIsNotNull(map, "payload");
            this.payload = (Map<String, Object>) map;
        }

        public boolean equals(Object other) {
            return (other instanceof ConnectionError) && Intrinsics.areEqual(((ConnectionError) other).payload, this.payload);
        }

        public int hashCode() {
            return this.payload.hashCode();
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionError$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \t2\u00020\u0001:\u0001\tB\u0005¢\u0006\u0002\u0010\u0002J\u0013\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0002J\b\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\n"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionAcknowledge;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "()V", "equals", "", "other", "", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class ConnectionAcknowledge extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "connection_ack";

        public ConnectionAcknowledge() {
            super(null);
        }

        public boolean equals(Object other) {
            return other instanceof ConnectionAcknowledge;
        }

        public int hashCode() {
            return getClass().hashCode();
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionAcknowledge$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010$\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \r2\u00020\u0001:\u0001\rB%\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0014\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u0005¢\u0006\u0002\u0010\u0007J\u0013\u0010\b\u001a\u00020\t2\b\u0010\n\u001a\u0004\u0018\u00010\u0006H\u0002J\b\u0010\u000b\u001a\u00020\fH\u0016R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00038\u0006X\u0004¢\u0006\u0002\n\u0000R\u001e\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u00058\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Data;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "id", "", "payload", "", "", "(Ljava/lang/String;Ljava/util/Map;)V", "equals", "", "other", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class Data extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "data";
        public final String id;
        public final Map<String, Object> payload;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public Data(String id2, Map<String, ? extends Object> map) {
            super(null);
            Intrinsics.checkParameterIsNotNull(map, "payload");
            this.id = id2;
            this.payload = (Map<String, Object>) map;
        }

        public boolean equals(Object other) {
            return (other instanceof Data) && Intrinsics.areEqual(((Data) other).id, this.id) && Intrinsics.areEqual(((Data) other).payload, this.payload);
        }

        public int hashCode() {
            String str = this.id;
            return ((str != null ? str.hashCode() : 0) * 31) + this.payload.hashCode();
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Data$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010$\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \r2\u00020\u0001:\u0001\rB%\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0014\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u0005¢\u0006\u0002\u0010\u0007J\u0013\u0010\b\u001a\u00020\t2\b\u0010\n\u001a\u0004\u0018\u00010\u0006H\u0002J\b\u0010\u000b\u001a\u00020\fH\u0016R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00038\u0006X\u0004¢\u0006\u0002\n\u0000R\u001e\u0010\u0004\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u00058\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Error;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "id", "", "payload", "", "", "(Ljava/lang/String;Ljava/util/Map;)V", "equals", "", "other", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class Error extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "error";
        public final String id;
        public final Map<String, Object> payload;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public Error(String id2, Map<String, ? extends Object> map) {
            super(null);
            Intrinsics.checkParameterIsNotNull(map, "payload");
            this.id = id2;
            this.payload = (Map<String, Object>) map;
        }

        public boolean equals(Object other) {
            return (other instanceof Error) && Intrinsics.areEqual(((Error) other).id, this.id) && Intrinsics.areEqual(((Error) other).payload, this.payload);
        }

        public int hashCode() {
            String str = this.id;
            return ((str != null ? str.hashCode() : 0) * 31) + this.payload.hashCode();
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Error$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \u000b2\u00020\u0001:\u0001\u000bB\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\u0013\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\bH\u0002J\b\u0010\t\u001a\u00020\nH\u0016R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00038\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Complete;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "id", "", "(Ljava/lang/String;)V", "equals", "", "other", "", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class Complete extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "complete";
        public final String id;

        public Complete(String id2) {
            super(null);
            this.id = id2;
        }

        public boolean equals(Object other) {
            return (other instanceof Complete) && Intrinsics.areEqual(((Complete) other).id, this.id);
        }

        public int hashCode() {
            String str = this.id;
            if (str != null) {
                return str.hashCode();
            }
            return 0;
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Complete$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \t2\u00020\u0001:\u0001\tB\u0005¢\u0006\u0002\u0010\u0002J\u0013\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0002J\b\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\n"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionKeepAlive;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "()V", "equals", "", "other", "", "hashCode", "", "Companion", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class ConnectionKeepAlive extends OperationServerMessage {
        public static final Companion Companion = new Companion(null);
        public static final String TYPE = "ka";

        public ConnectionKeepAlive() {
            super(null);
        }

        public boolean equals(Object other) {
            return other instanceof ConnectionKeepAlive;
        }

        public int hashCode() {
            return getClass().hashCode();
        }

        @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004XT¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$ConnectionKeepAlive$Companion;", "", "()V", "TYPE", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
        /* compiled from: OperationServerMessage.kt */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker $constructor_marker) {
                this();
            }
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0013\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\bH\u0002J\b\u0010\t\u001a\u00020\nH\u0016R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0004¢\u0006\u0002\n\u0000¨\u0006\u000b"}, d2 = {"Lcom/apollographql/apollo/subscription/OperationServerMessage$Unsupported;", "Lcom/apollographql/apollo/subscription/OperationServerMessage;", "rawMessage", "", "(Ljava/lang/String;)V", "equals", "", "other", "", "hashCode", "", "apollo-runtime"}, k = 1, mv = {1, 4, 0})
    /* compiled from: OperationServerMessage.kt */
    public static final class Unsupported extends OperationServerMessage {
        public final String rawMessage;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public Unsupported(String rawMessage2) {
            super(null);
            Intrinsics.checkParameterIsNotNull(rawMessage2, "rawMessage");
            this.rawMessage = rawMessage2;
        }

        public boolean equals(Object other) {
            return (other instanceof Unsupported) && Intrinsics.areEqual(((Unsupported) other).rawMessage, this.rawMessage);
        }

        public int hashCode() {
            return this.rawMessage.hashCode();
        }
    }
}
